<?php

require_once("phpFlickr.php");

class Testflickr extends CI_Controller {

	public function index()
	{
		echo 'Test Flickr!';
		
		$f = new phpFlickr("ff48d33a6c7e7569038bbea86a704be1","424fa62bd1fda9e8");
		
		$resp1 = $f->people_findByUsername("bombin98");
		
		echo "<p>findByUsername";
		echo "<pre>";
		print_r($resp1);
		echo "</pre>";
				
		
		$resp2 = $f->people_getPublicPhotos("68458853@N08");
		
		echo "<p>getPublicPhotos";
		echo "<pre>";
		print_r($resp2);
		echo "</pre>";
		

		$resp3 = $f->people_getPhotos("68458853@N08");
		
		echo "<p>getPhotos";
		echo "<pre>";
		print_r($resp3);
		echo "</pre>";
		
		
		
		$recent = $f->photos_getRecent(1,null,5,5);

		
		echo "<p>getRecent";
		echo "<pre>";
		print_r($recent);
		echo "</pre>";
		
		
		foreach ($resp2['photos']['photo'] as $photo) {
    		echo "<br><a href='http://www.flickr.com/photos/" . $photo['owner'] . "/" . $photo['id'] . "/'>";
    		echo $photo['title'];
    		echo "</a>";
		}

		
		/*		
		$f->auth("read");
		

		$resp3 = $f->galleries_create("Motoquero", "Album motoquero");
		
		echo "<p>galleries_create";
		echo "<pre>";
		echo $resp3;
		echo "</pre>";
		*/
		
		
	}
	
	
	
	
	
}



/* End of file testflickr.php */
/* Location: ./application/controllers/admin/testflickr.php */